<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模块化的使用</title>
</head>

<body>
    <!-- 导入模块 -->
    <!-- <script src="../js/02.modul.js" type="module"></script> -->
    <script type="module">
        // <!-- <script> -->
        import sayHi from '../js/02.modul.js'
        console.log('sayHi:', sayHi)

        // 导入 按需导出
        import { name as myname, food } from '../js/02.modul.js'
        console.log('myname:', myname);
        console.log('food:', food);


    </script>
</body>

</html>